package com.kma.tarotyourname;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.kma.name.tarot.R;
import com.startapp.android.publish.StartAppAd;
import com.startapp.android.publish.StartAppSDK;

public class MainActivity extends ActionBarActivity {
	private StartAppAd startAppAd = new StartAppAd(this);
	private Button buttonShowFull;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		StartAppSDK.init(this, "109254647", "207400037", true);
		StartAppAd.showSplash(this, savedInstanceState);
		StartAppAd.showSlider(this);
		
		setContentView(R.layout.activity_main);
		
		buttonShowFull = (Button)findViewById(R.id.button1);
		buttonShowFull.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				startAppAd.showAd(); // show the ad
				startAppAd.loadAd(); // load the next ad
				
			}
		});

	}

	@Override
	public void onPause() {
	    super.onPause();
	    startAppAd.onPause();
	}
	
	@Override
	public void onBackPressed() {
	    startAppAd.onBackPressed();
	    super.onBackPressed();
	}

}
